package com.pzsh.util;

import org.apache.ibatis.session.RowBounds;

public class RowBoundUtil {

    /**
     * 根据分页属性 生成 RowBounds
     * @param limit
     * @param offset
     * @return
     */
    public static RowBounds getRowBounds(int limit, int offset){
         offset = (offset - 1) * limit;
        RowBounds rowBounds = new RowBounds(offset, limit);
        return rowBounds;
    }
}